Optimal. Leaf size=141 \[ -\frac{d-e+f-g}{36 (x+1)}+\frac{d+e+f+g}{12 (1-x)}+\frac{d+2 e+4 f+8 g}{36 (2-x)}+\frac{1}{36} \log (1-x) (2 d+5 e+8 f+11 g)-\frac{1}{432} \log (2-x) (35 d+58 e+92 f+136 g)+\frac{1}{108} \log (x+1) (2 d+e-4 f+7 g)+\frac{1}{144} \log (x+2) (d-2 e+4 f-8 g) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.252681, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.065, Rules used = {1586, 6742} \[ -\frac{d-e+f-g}{36 (x+1)}+\frac{d+e+f+g}{12 (1-x)}+\frac{d+2 e+4 f+8 g}{36 (2-x)}+\frac{1}{36} \log (1-x) (2 d+5 e+8 f+11 g)-\frac{1}{432} \log (2-x) (35 d+58 e+92 f+136 g)+\frac{1}{108} \log (x+1) (2 d+e-4 f+7 g)+\frac{1}{144} \log (x+2) (d-2 e+4 f-8 g) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1586
Rule 6742
Rubi steps
\begin{align*} \int \frac{(2+x) \left (d+e x+f x^2+g x^3\right )}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac{d+e x+f x^2+g x^3}{(2+x) \left (2-x-2 x^2+x^3\right )^2} \, dx\\ &=\int \left (\frac{d+2 e+4 f+8 g}{36 (-2+x)^2}+\frac{-35 d-58 e-92 f-136 g}{432 (-2+x)}+\frac{d+e+f+g}{12 (-1+x)^2}+\frac{2 d+5 e+8 f+11 g}{36 (-1+x)}+\frac{d-e+f-g}{36 (1+x)^2}+\frac{2 d+e-4 f+7 g}{108 (1+x)}+\frac{d-2 e+4 f-8 g}{144 (2+x)}\right ) \, dx\\ &=\frac{d+e+f+g}{12 (1-x)}+\frac{d+2 e+4 f+8 g}{36 (2-x)}-\frac{d-e+f-g}{36 (1+x)}+\frac{1}{36} (2 d+5 e+8 f+11 g) \log (1-x)-\frac{1}{432} (35 d+58 e+92 f+136 g) \log (2-x)+\frac{1}{108} (2 d+e-4 f+7 g) \log (1+x)+\frac{1}{144} (d-2 e+4 f-8 g) \log (2+x)\\ \end{align*}
Mathematica [A] time = 0.0790906, size = 144, normalized size = 1.02 \[ \frac{1}{432} \left (\frac{12 \left (d \left (-5 x^2+6 x+5\right )+2 \left (e \left (5-2 x^2\right )+f \left (-4 x^2+3 x+4\right )+g \left (8-5 x^2\right )\right )\right )}{x^3-2 x^2-x+2}+12 \log (1-x) (2 d+5 e+8 f+11 g)-\log (2-x) (35 d+58 e+92 f+136 g)+4 \log (x+1) (2 d+e-4 f+7 g)+3 \log (x+2) (d-2 e+4 f-8 g)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.014, size = 210, normalized size = 1.5 \begin{align*}{\frac{\ln \left ( 2+x \right ) d}{144}}-{\frac{\ln \left ( 2+x \right ) e}{72}}+{\frac{\ln \left ( 1+x \right ) d}{54}}+{\frac{\ln \left ( 1+x \right ) e}{108}}-{\frac{35\,\ln \left ( x-2 \right ) d}{432}}-{\frac{29\,\ln \left ( x-2 \right ) e}{216}}+{\frac{\ln \left ( x-1 \right ) d}{18}}+{\frac{5\,\ln \left ( x-1 \right ) e}{36}}-{\frac{d}{36+36\,x}}+{\frac{e}{36+36\,x}}-{\frac{2\,g}{9\,x-18}}-{\frac{d}{36\,x-72}}-{\frac{e}{18\,x-36}}-{\frac{g}{12\,x-12}}-{\frac{d}{12\,x-12}}-{\frac{e}{12\,x-12}}+{\frac{g}{36+36\,x}}-{\frac{f}{36+36\,x}}-{\frac{f}{9\,x-18}}-{\frac{f}{12\,x-12}}-{\frac{\ln \left ( 2+x \right ) g}{18}}+{\frac{7\,\ln \left ( 1+x \right ) g}{108}}-{\frac{17\,\ln \left ( x-2 \right ) g}{54}}+{\frac{11\,\ln \left ( x-1 \right ) g}{36}}-{\frac{23\,\ln \left ( x-2 \right ) f}{108}}+{\frac{2\,\ln \left ( x-1 \right ) f}{9}}+{\frac{\ln \left ( 2+x \right ) f}{36}}-{\frac{\ln \left ( 1+x \right ) f}{27}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.969686, size = 170, normalized size = 1.21 \begin{align*} \frac{1}{144} \,{\left (d - 2 \, e + 4 \, f - 8 \, g\right )} \log \left (x + 2\right ) + \frac{1}{108} \,{\left (2 \, d + e - 4 \, f + 7 \, g\right )} \log \left (x + 1\right ) + \frac{1}{36} \,{\left (2 \, d + 5 \, e + 8 \, f + 11 \, g\right )} \log \left (x - 1\right ) - \frac{1}{432} \,{\left (35 \, d + 58 \, e + 92 \, f + 136 \, g\right )} \log \left (x - 2\right ) - \frac{{\left (5 \, d + 4 \, e + 8 \, f + 10 \, g\right )} x^{2} - 6 \,{\left (d + f\right )} x - 5 \, d - 10 \, e - 8 \, f - 16 \, g}{36 \,{\left (x^{3} - 2 \, x^{2} - x + 2\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 6.2306, size = 867, normalized size = 6.15 \begin{align*} -\frac{12 \,{\left (5 \, d + 4 \, e + 8 \, f + 10 \, g\right )} x^{2} - 72 \,{\left (d + f\right )} x - 3 \,{\left ({\left (d - 2 \, e + 4 \, f - 8 \, g\right )} x^{3} - 2 \,{\left (d - 2 \, e + 4 \, f - 8 \, g\right )} x^{2} -{\left (d - 2 \, e + 4 \, f - 8 \, g\right )} x + 2 \, d - 4 \, e + 8 \, f - 16 \, g\right )} \log \left (x + 2\right ) - 4 \,{\left ({\left (2 \, d + e - 4 \, f + 7 \, g\right )} x^{3} - 2 \,{\left (2 \, d + e - 4 \, f + 7 \, g\right )} x^{2} -{\left (2 \, d + e - 4 \, f + 7 \, g\right )} x + 4 \, d + 2 \, e - 8 \, f + 14 \, g\right )} \log \left (x + 1\right ) - 12 \,{\left ({\left (2 \, d + 5 \, e + 8 \, f + 11 \, g\right )} x^{3} - 2 \,{\left (2 \, d + 5 \, e + 8 \, f + 11 \, g\right )} x^{2} -{\left (2 \, d + 5 \, e + 8 \, f + 11 \, g\right )} x + 4 \, d + 10 \, e + 16 \, f + 22 \, g\right )} \log \left (x - 1\right ) +{\left ({\left (35 \, d + 58 \, e + 92 \, f + 136 \, g\right )} x^{3} - 2 \,{\left (35 \, d + 58 \, e + 92 \, f + 136 \, g\right )} x^{2} -{\left (35 \, d + 58 \, e + 92 \, f + 136 \, g\right )} x + 70 \, d + 116 \, e + 184 \, f + 272 \, g\right )} \log \left (x - 2\right ) - 60 \, d - 120 \, e - 96 \, f - 192 \, g}{432 \,{\left (x^{3} - 2 \, x^{2} - x + 2\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09334, size = 184, normalized size = 1.3 \begin{align*} \frac{1}{144} \,{\left (d + 4 \, f - 8 \, g - 2 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac{1}{108} \,{\left (2 \, d - 4 \, f + 7 \, g + e\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac{1}{36} \,{\left (2 \, d + 8 \, f + 11 \, g + 5 \, e\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac{1}{432} \,{\left (35 \, d + 92 \, f + 136 \, g + 58 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac{{\left (5 \, d + 8 \, f + 10 \, g + 4 \, e\right )} x^{2} - 6 \,{\left (d + f\right )} x - 5 \, d - 8 \, f - 16 \, g - 10 \, e}{36 \,{\left (x + 1\right )}{\left (x - 1\right )}{\left (x - 2\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]